#include<iostream>
using namespace std;
void zhi(char &w,char &m)
{
	int t=w;
    w=m;
    m=t;
}
char *bian(char*a)
{
	int i=0;
	while(a[i]!='\0')
	{
		if(a[i]<65||(a[i]>90&&a[i]<97)||a[i]>122)
		{
			cout<<"error";
			return a;
		}
			a[i]=a[i]-3;
			if(a[i]<65||(a[i]>90&&a[i]<97))
			a[i]+=23;
			if(a[i]>96)
			a[i]-=32; 
			else
			a[1]+=32;
			i++;
		}
		i--;
		for(int j=0;j<i;j++)
		{
			zhi(a[j],a[i]);
			i--;
		}
	 return a;
}
int main()
{
	char a[50];
	cin>>a;
	bian(a);
	cout<<a<<endl;
}